package com.gzx.plugin.tjzy.modular.blacklist.service;

import com.gzx.plugin.tjzy.modular.blacklist.bo.GzxBlackListAddBo;
import com.gzx.plugin.tjzy.modular.blacklist.bo.GzxBlackListQueryBo;
import com.gzx.plugin.tjzy.modular.blacklist.dto.GzxBlackRespDto;
import com.gzx.plugin.tjzy.modular.blacklist.vo.GzxBlackListVo;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.common.mvc.service.BaseService;

import java.util.List;

/**
 * @author xbl
 */
public interface GzxBlackListService extends BaseService<GzxBlackListAddBo, GzxBlackListVo, GzxBlackListQueryBo> {

    /**
     * 批量校验手机号是不是黑名单
     */
    List<GzxBlackListVo> checkBlackList(List<String> phoneList);

    /**
     * 查询所有业务|线路号码库黑名单
     *
     * @param type
     * @return
     */
    List<GzxBlackListVo> queryAll(String type);

    /**
     * 根据手机号查询号码库黑名单是否存在
     *
     * @param phone
     * @return
     */
    boolean isBlackList(String phone);

    /**
     * 校验黑名单
     *
     * @param phoneList
     */
    List<GzxBlackRespDto.DataResp> verifyBlack(List<String> phoneList);

    /**
     * 导入
     */
    String importExcel(GzxBlackListAddBo bo, MultipartFile file);

    //消费kafka数据入库
    void asyncInsertRecord(List<ConsumerRecord<String, String>> recordList);
}
